package com.kelp.codetoolkit.service

import com.intellij.openapi.module.Module
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.psi.PsiClass
import com.intellij.psi.PsiJavaFile

/**
 * @author: liuyuebai
 * @date: 2024/8/3 13:36
 * @description:
 */
interface WriteFileService {

    companion object{
        fun getInstance(project: Project): WriteFileService {
            return project.getService(WriteFileService::class.java)
        }
    }

    fun writeBusinessLogicFile(project: Project, codeParams: MutableMap<String, String>)

    /**
     * 写入导包
     */
    fun writeImportPackage(project: Project, psiJavaFile: PsiJavaFile, importPsiClassList:MutableSet<PsiClass>)

    /**
     * 写入方法
     */
    fun writeInterfaceMethod(project: Project, codeContent: String,psiClass: PsiClass)

    /**
     * 将xmlContent写入指定的XML虚拟文件
     */
    fun writeXmlContentToFile(project: Project, xmlVirtualFile: VirtualFile,xmlContent:String,xmlId: String)
}